<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Model\Base;

class AdminUser extends Authenticatable
{
    use Notifiable;
    //表名
    protected $table = 'admin_users';

    //指定主键
    protected $primaryKey = 'id';

    //指定允许批量赋值的字段
    protected $fillable = [
        'username', 'password',
    ];

    //指定不允许批量赋值的字段
    // protected $guarded = [];

//    //自动维护时间戳
//    public $timestamps = false;
//
//    //定制时间戳格式
//    protected $dateFormat = 'U';
//
//    //将默认增加时间转化为时间戳
//    protected function getDateFormat()
//    {
//        return time();
//    }

    /**
     * The attributes excluded from the model's JSON form.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token'
    ];
}
